package com.gress.shop.service;

import com.gress.shop.bo.Menu;
import com.gress.shop.bo.example.MenuExample;
import com.gress.shop.vo.JsonId;
import com.gress.shop.vo.SwalReturn;

import java.util.List;
import java.util.Set;

/**
 * Created xiongwen with 2018/3/6 15:42
 * Description:
 */
public interface IMenuService {

    Menu update(Menu menu);

    Menu save(Menu menu);

    SwalReturn deleteById(String id);

    Menu selectMenuById(String id);

    List<Menu> queryByExample(MenuExample example);

    Menu queryMenuById(String id);


    /**
     * @param
     * @Date: 10:14 2018/3/7
     * @Description: 构建菜单
     **/
    Set<Menu> buildMenuTree();

    /***
     *
     * 根据Email 去构建菜单
     * */
    Set<Menu> buildMenuTree(String email);

    /**
     * @param jsonIds
     * @param parentId
     * @Date: 10:02 2018/4/5
     * @Description:
     * @return:
     */
    void sortMenu(List<JsonId> jsonIds, String parentId);

}
